package com.douqu.game.main.server.entity;

import com.bean.core.util.TimeUtils;
import com.douqu.game.core.config.map.CityConfig;
import com.douqu.game.core.factory.DataFactory;

/**
 * 大地图战斗记录
 * @Author: Bean
 * @Description:
 * @Date: 2018-07-27 14:03
 */
public class RecordWorldMapBattle {


    private long createTime;

    private int cityId;

    private String battleId;

    private String type;

    private String battleDetailType;

    private String remark;



    public String getCityName()
    {
        CityConfig cityConfig = DataFactory.getInstance().getGameObject(DataFactory.CITY_KEY, cityId);
        return cityConfig != null ? cityConfig.name : (cityId+"");
    }

    public String getCreateTime() {
        return TimeUtils.getFormatTime(createTime);
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public int getCityId() {
        return cityId;
    }

    public void setCityId(int cityId) {
        this.cityId = cityId;
    }

    public String getBattleId() {
        return battleId;
    }

    public void setBattleId(String battleId) {
        this.battleId = battleId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getBattleDetailType() {
        return battleDetailType;
    }

    public void setBattleDetailType(String battleDetailType) {
        this.battleDetailType = battleDetailType;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof RecordWorldMapBattle)) return false;

        RecordWorldMapBattle that = (RecordWorldMapBattle) o;

        if (battleId != null ? !battleId.equals(that.battleId) : that.battleId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return battleId != null ? battleId.hashCode() : 0;
    }
}
